Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow lowercase UTF8 OPTS #413

Merged
merged 1 commit into from
Jun 17, 2022
Merged

Allow lowercase UTF8 OPTS #413

merged 1 commit into from
Jun 17, 2022

Conversation

dani-garcia
Copy link
Contributor

The FTP client included in Windows Explorer sends this command in lowercase. Without this patch the server would respond with an invalid command error and the client would refuse to continue.

Wireshark trace for reference:
winftp

The FTP client included in Windows Explorer sends this command in lowercase. Without this patch the server would respond with an invalid command error and the client would refuse to continue
@hannesdejager hannesdejager merged commit 79e85a1 into bolcom:master Jun 17, 2022
@hannesdejager
Copy link
Collaborator

Nice catch, thanks @dani-garcia

@dani-garcia dani-garcia deleted the lowercase_opts branch June 17, 2022 14:45
@hannesdejager
Copy link
Collaborator

@dani-garcia I was curious whether or not you ran unFTP also on Windows? We're not really testing on Windows, so any feedback would be appreciated.

@dani-garcia
Copy link
Contributor Author

I've tested the server both in Windows and on Ubuntu, using a custom storage backend based on the provided filesystem storage backend (with some changes for separate folders per user, etc.), and so far it hasn't caused any issues. Everything seems to work correctly on Windows the same way as Ubuntu.

I've noticed only one small quirk on the windows version, and when navigating to subdirectories the Windows \ path separator seems to cause some confusion on the clients. I should mention that it seems to only affect visuals in all the clients I've tested, and the clients work correctly against a Windows-based libunftp server.

On Filezilla, navigating to the directory bar inside the test folder moves you to /test\bar, which the client confuses with a valid folder with name test\bar and so it appears on the tree view.
Left is Windows host, and right is Ubuntu host, both using the same Filezilla client:
Screenshot 2022-06-17 170808

On WinSCP, going up a directory, by clicking the .. entry, would just append the \.. to the path instead of deleting the last segment.
Screenshot 2022-06-17 171305

I haven't looked into how easy would be to convert the \ separators to / in the response to the PWD command, but it's possible that just changing that would fix it. I'll see if I have some time to check that this weekend.

@dani-garcia dani-garcia mentioned this pull request Jun 18, 2022
@robklg robklg mentioned this pull request Jun 19, 2022
@hannesdejager
Copy link
Collaborator

Super feedback, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants